#include "InputGeom.h"
#ifdef __cplusplus
extern "C" {
#endif
BuildSettings * nav_NewBuildSettings(){
	BuildSettings* wrap_out = new BuildSettings();
	return wrap_out;
}

void nav_BuildSettings_Delete(BuildSettings * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_BuildSettings_DeleteArray(BuildSettings * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

float * nav_BuildSettings_GetPtrToAgentHeight(BuildSettings * c_this){
	return (float *)(&(c_this->agentHeight));
}

float * nav_BuildSettings_GetPtrToAgentMaxClimb(BuildSettings * c_this){
	return (float *)(&(c_this->agentMaxClimb));
}

float * nav_BuildSettings_GetPtrToAgentMaxSlope(BuildSettings * c_this){
	return (float *)(&(c_this->agentMaxSlope));
}

float * nav_BuildSettings_GetPtrToAgentRadius(BuildSettings * c_this){
	return (float *)(&(c_this->agentRadius));
}

float * nav_BuildSettings_GetPtrToCellHeight(BuildSettings * c_this){
	return (float *)(&(c_this->cellHeight));
}

float * nav_BuildSettings_GetPtrToCellSize(BuildSettings * c_this){
	return (float *)(&(c_this->cellSize));
}

float * nav_BuildSettings_GetPtrToDetailSampleDist(BuildSettings * c_this){
	return (float *)(&(c_this->detailSampleDist));
}

float * nav_BuildSettings_GetPtrToDetailSampleMaxError(BuildSettings * c_this){
	return (float *)(&(c_this->detailSampleMaxError));
}

float * nav_BuildSettings_GetPtrToEdgeMaxError(BuildSettings * c_this){
	return (float *)(&(c_this->edgeMaxError));
}

float * nav_BuildSettings_GetPtrToEdgeMaxLen(BuildSettings * c_this){
	return (float *)(&(c_this->edgeMaxLen));
}

float(*nav_BuildSettings_GetPtrToNavMeshBMax(BuildSettings * c_this))[3]{
	return (float(*)[3])(&(c_this->navMeshBMax));
}

float(*nav_BuildSettings_GetPtrToNavMeshBMin(BuildSettings * c_this))[3]{
	return (float(*)[3])(&(c_this->navMeshBMin));
}

int * nav_BuildSettings_GetPtrToPartitionType(BuildSettings * c_this){
	return (int *)(&(c_this->partitionType));
}

float * nav_BuildSettings_GetPtrToRegionMergeSize(BuildSettings * c_this){
	return (float *)(&(c_this->regionMergeSize));
}

float * nav_BuildSettings_GetPtrToRegionMinSize(BuildSettings * c_this){
	return (float *)(&(c_this->regionMinSize));
}

float * nav_BuildSettings_GetPtrToTileSize(BuildSettings * c_this){
	return (float *)(&(c_this->tileSize));
}

float * nav_BuildSettings_GetPtrToVertsPerPoly(BuildSettings * c_this){
	return (float *)(&(c_this->vertsPerPoly));
}

BuildSettings * nav_BuildSettings_IndexArray(BuildSettings * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

ConvexVolume * nav_NewConvexVolume(){
	ConvexVolume* wrap_out = new ConvexVolume();
	return wrap_out;
}

void nav_ConvexVolume_Delete(ConvexVolume * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_ConvexVolume_DeleteArray(ConvexVolume * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

int * nav_ConvexVolume_GetPtrToArea(ConvexVolume * c_this){
	return (int *)(&(c_this->area));
}

float * nav_ConvexVolume_GetPtrToHmax(ConvexVolume * c_this){
	return (float *)(&(c_this->hmax));
}

float * nav_ConvexVolume_GetPtrToHmin(ConvexVolume * c_this){
	return (float *)(&(c_this->hmin));
}

int * nav_ConvexVolume_GetPtrToNverts(ConvexVolume * c_this){
	return (int *)(&(c_this->nverts));
}

float(*nav_ConvexVolume_GetPtrToVerts(ConvexVolume * c_this))[36]{
	return (float(*)[36])(&(c_this->verts));
}

ConvexVolume * nav_ConvexVolume_IndexArray(ConvexVolume * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

void nav_InputGeom_addConvexVolume(InputGeom * c_this,float const * verts,int const nverts,float const minh,float const maxh,unsigned char area){
	float const * c_arg_verts=(float const *)(void*)(verts);
	int const c_arg_nverts=nverts;
	float const c_arg_minh=minh;
	float const c_arg_maxh=maxh;
	unsigned char c_arg_area=area;
	c_this->addConvexVolume(c_arg_verts,c_arg_nverts,c_arg_minh,c_arg_maxh,c_arg_area);
}

void nav_InputGeom_addOffMeshConnection(InputGeom * c_this,float const * spos,float const * epos,float const rad,unsigned char bidir,unsigned char area,unsigned short flags){
	float const * c_arg_spos=(float const *)(void*)(spos);
	float const * c_arg_epos=(float const *)(void*)(epos);
	float const c_arg_rad=rad;
	unsigned char c_arg_bidir=bidir;
	unsigned char c_arg_area=area;
	unsigned short c_arg_flags=flags;
	c_this->addOffMeshConnection(c_arg_spos,c_arg_epos,c_arg_rad,c_arg_bidir,c_arg_area,c_arg_flags);
}

void nav_InputGeom_Delete(InputGeom * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_InputGeom_DeleteArray(InputGeom * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

void nav_InputGeom_deleteConvexVolume(InputGeom * c_this,int i){
	int c_arg_i=i;
	c_this->deleteConvexVolume(c_arg_i);
}

void nav_InputGeom_deleteOffMeshConnection(InputGeom * c_this,int i){
	int c_arg_i=i;
	c_this->deleteOffMeshConnection(c_arg_i);
}

void nav_InputGeom_drawConvexVolumes(InputGeom * c_this,duDebugDraw * dd,bool hilight){
	duDebugDraw * c_arg_dd=(duDebugDraw *)(void*)(dd);
	bool c_arg_hilight=hilight;
	c_this->drawConvexVolumes(c_arg_dd,c_arg_hilight);
}

void nav_InputGeom_drawOffMeshConnections(InputGeom * c_this,duDebugDraw * dd,bool hilight){
	duDebugDraw * c_arg_dd=(duDebugDraw *)(void*)(dd);
	bool c_arg_hilight=hilight;
	c_this->drawOffMeshConnections(c_arg_dd,c_arg_hilight);
}

BuildSettings const * nav_InputGeom_getBuildSettings(InputGeom const * c_this){
	BuildSettings const * c_out = c_this->getBuildSettings();
	BuildSettings const * wrap_out  = (BuildSettings const *)(void*)(c_out);
	return wrap_out;
}

rcChunkyTriMesh const * nav_InputGeom_getChunkyMesh(InputGeom const * c_this){
	rcChunkyTriMesh const * c_out = c_this->getChunkyMesh();
	rcChunkyTriMesh const * wrap_out  = (rcChunkyTriMesh const *)(void*)(c_out);
	return wrap_out;
}

int nav_InputGeom_getConvexVolumeCount(InputGeom const * c_this){
	int c_out = c_this->getConvexVolumeCount();
	int wrap_out  = (c_out);
	return wrap_out;
}

ConvexVolume const * nav_InputGeom_getConvexVolumes(InputGeom const * c_this){
	ConvexVolume const * c_out = c_this->getConvexVolumes();
	ConvexVolume const * wrap_out  = (ConvexVolume const *)(void*)(c_out);
	return wrap_out;
}

rcMeshLoaderObj const * nav_InputGeom_getMesh(InputGeom const * c_this){
	rcMeshLoaderObj const * c_out = c_this->getMesh();
	rcMeshLoaderObj const * wrap_out  = (rcMeshLoaderObj const *)(void*)(c_out);
	return wrap_out;
}

float const * nav_InputGeom_getMeshBoundsMax(InputGeom const * c_this){
	float const * c_out = c_this->getMeshBoundsMax();
	float const * wrap_out  = (float const *)(void*)(c_out);
	return wrap_out;
}

float const * nav_InputGeom_getMeshBoundsMin(InputGeom const * c_this){
	float const * c_out = c_this->getMeshBoundsMin();
	float const * wrap_out  = (float const *)(void*)(c_out);
	return wrap_out;
}

float const * nav_InputGeom_getNavMeshBoundsMax(InputGeom const * c_this){
	float const * c_out = c_this->getNavMeshBoundsMax();
	float const * wrap_out  = (float const *)(void*)(c_out);
	return wrap_out;
}

float const * nav_InputGeom_getNavMeshBoundsMin(InputGeom const * c_this){
	float const * c_out = c_this->getNavMeshBoundsMin();
	float const * wrap_out  = (float const *)(void*)(c_out);
	return wrap_out;
}

unsigned char const * nav_InputGeom_getOffMeshConnectionAreas(InputGeom const * c_this){
	unsigned char const * c_out = c_this->getOffMeshConnectionAreas();
	unsigned char const * wrap_out  = (unsigned char const *)(void*)(c_out);
	return wrap_out;
}

int nav_InputGeom_getOffMeshConnectionCount(InputGeom const * c_this){
	int c_out = c_this->getOffMeshConnectionCount();
	int wrap_out  = (c_out);
	return wrap_out;
}

unsigned char const * nav_InputGeom_getOffMeshConnectionDirs(InputGeom const * c_this){
	unsigned char const * c_out = c_this->getOffMeshConnectionDirs();
	unsigned char const * wrap_out  = (unsigned char const *)(void*)(c_out);
	return wrap_out;
}

unsigned short const * nav_InputGeom_getOffMeshConnectionFlags(InputGeom const * c_this){
	unsigned short const * c_out = c_this->getOffMeshConnectionFlags();
	unsigned short const * wrap_out  = (unsigned short const *)(void*)(c_out);
	return wrap_out;
}

unsigned int const * nav_InputGeom_getOffMeshConnectionId(InputGeom const * c_this){
	unsigned int const * c_out = c_this->getOffMeshConnectionId();
	unsigned int const * wrap_out  = (unsigned int const *)(void*)(c_out);
	return wrap_out;
}

float const * nav_InputGeom_getOffMeshConnectionRads(InputGeom const * c_this){
	float const * c_out = c_this->getOffMeshConnectionRads();
	float const * wrap_out  = (float const *)(void*)(c_out);
	return wrap_out;
}

float const * nav_InputGeom_getOffMeshConnectionVerts(InputGeom const * c_this){
	float const * c_out = c_this->getOffMeshConnectionVerts();
	float const * wrap_out  = (float const *)(void*)(c_out);
	return wrap_out;
}

InputGeom * nav_InputGeom_IndexArray(InputGeom * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

InputGeom * nav_NewInputGeom(){
	InputGeom* wrap_out = new InputGeom();
	return wrap_out;
}

bool nav_InputGeom_raycastMesh(InputGeom * c_this,float * src,float * dst,float * tmin){
	float * c_arg_src=(float *)(void*)(src);
	float * c_arg_dst=(float *)(void*)(dst);
	float& c_arg_tmin=*(float *)(tmin);
	bool c_out = c_this->raycastMesh(c_arg_src,c_arg_dst,c_arg_tmin);
	bool wrap_out  = (c_out);
	return wrap_out;
}

bool nav_InputGeom_saveGeomSet(InputGeom * c_this,BuildSettings const * settings){
	BuildSettings const * c_arg_settings=(BuildSettings const *)(void*)(settings);
	bool c_out = c_this->saveGeomSet(c_arg_settings);
	bool wrap_out  = (c_out);
	return wrap_out;
}

BuildSettings * nav_NewBuildSettingsPtrArray(long n){
	BuildSettings* c_this=new BuildSettings[n];
	return c_this;
}

ConvexVolume * nav_NewConvexVolumePtrArray(long n){
	ConvexVolume* c_this=new ConvexVolume[n];
	return c_this;
}

InputGeom * nav_NewInputGeomPtrArray(long n){
	InputGeom* c_this=new InputGeom[n];
	return c_this;
}

#ifdef __cplusplus
}
#endif
